#!/usr/bin/bash

device_id=$1
data_split=$2  # ceramics or bamboo_slips
model_base=$3
model_path=$4
vision_tower=$5
output_folder=$6

cd $HOME
source .bash_profile
conda activate lxb39
cd $HOME/projects/LLaVA

IMAGES_FOLDER=$DATASETS/sciencedb/${data_split}/images

export CUDA_VISIBLE_DEVICES=${device_id}
echo "Evaluation the performance of multi-modal model on the ${data_split} split of COCO karpathy split"
python -m llava.eval.model_chinese_loader \
    --model-base $model_base \
    --model-path $model_path \
    --vision-tower $vision_tower \
    --images-folder ${IMAGES_FOLDER} \
    --output-folder $OUTPUTS/LLaVA/evaluations/${output_folder} \
    --max-new-tokens 500 \
    --num-beams 1 \
    --do-sample False \
    --min-length 0 \
    --top-p 0.9 \
    --top-k 50 \
    --repetition-penalty 1.0 \
    --length-penalty 1.0 \
    --temperature 1.0 \
    --conv-mode mpt \
    --num-workers 0 \
    --image-aspect-ratio pad

